<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
	<body class="pear-container">
		<div class="layui-card">
			<div class="layui-card-body">
				<form class="layui-form layui-form-pane" action="">
					<div class="layui-form-item">
                           
               <div class="layui-form-item layui-inline">
                   <label class="layui-form-label">面料编号</label>
                   <div class="layui-input-inline">
                       <input type="text" name="fabric_code" placeholder="" class="layui-input">
                   </div>
               </div>   
               <div class="layui-form-item layui-inline">
                   <label class="layui-form-label">色号</label>
                   <div class="layui-input-inline">
                       <input type="text" name="color_code" placeholder="" class="layui-input">
                   </div>
               </div>
               <div class="layui-form-item layui-inline">
                   <label class="layui-form-label">供应编号</label>
                   <div class="layui-input-inline">
                       <input type="text" name="sup_code" placeholder="" class="layui-input">
                   </div>
               </div>
               <div class="layui-form-item layui-inline">
                   <label class="layui-form-label">供应颜色</label>
                   <div class="layui-input-inline">
                       <input type="text" name="sup_color" placeholder="" class="layui-input">
                   </div>
               </div>
               <div class="layui-form-item layui-inline">
                   <label class="layui-form-label">供应商</label>
                   <div class="layui-input-inline">
                       <input type="text" name="sup_id" placeholder="" class="layui-input">
                   </div>
               </div> 
                        <div class="layui-form-item layui-inline">
                       <button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="query">
                           <i class="layui-icon layui-icon-search"></i>
                           查询
                       </button>
                       <button type="reset" class="pear-btn pear-btn-md">
                           <i class="layui-icon layui-icon-refresh"></i>
                           重置
                       </button>
                       </div>
                    </div>
				</form>
			</div>
		</div>
		<div class="layui-card">
			<div class="layui-card-body">
				<table id="dataTable" lay-filter="dataTable"></table>
			</div>
		</div>

		<script type="text/html" id="toolbar">
			<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
		        <i class="layui-icon layui-icon-add-1"></i>
		        新增
			</button>
			<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
		        <i class="layui-icon layui-icon-delete"></i>
		        删除
		    </button>
            <!-- <button class="pear-btn pear-btn-md" lay-event="recycle">
		        <i class="layui-icon layui-icon-delete"></i>
		        回收站
		    </button> -->
		</script>

        

		<script type="text/html" id="options">
			<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
		    <button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
		</script>
        <script>
        layui.use(['jquery','common','mycomm','table'], function() {
            let $ = layui.jquery;
			let common = layui.common;
			let mycomm = layui.mycomm;
			let table = layui.table;
            let MODULE_PATH = "{$MODULE_PATH}";
            
            
            let cols = [
                [{
                        type: 'checkbox'
                    // },{
                    //    field: "id",
                    //    title: "ID",
                    //    width:100,
                    //    unresize: "true",
                    //    align: "center"
                   }, {
                       field: "fabric_code",
                       title: "面料编号",
                       width:100,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "fabric_name",
                       title: "面料品名",
                       hide:true,
                       width:180,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "color_code",
                       title: "色号",
                       width:100,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "color_name",
                       title: "颜色名称",
                       width:100,
                       unresize: "true",
                       align: "center",
                    }, {
                        field: "sup_id",
                        title: "",
                        width:60,
                        unresize: "true",
                        align: "center",
                        templet:"<div>➡️</div>",
                   }, {
                       field: "sup_name",
                       title: "供应商",
                       width:100,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "sup_code",
                       title: "供应编号",
                       width:100,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "sup_color",
                       title: "供应色号",
                       width:100,
                       unresize: "true",
                       align: "center",
                   }, {
                       field: "fabric_name2",
                       title: "供应品名",
                       width:180,
                       unresize: "true",
                       align: "center"
                   }, {
                       field: "remark",
                       title: "备注",
                       edit:true,
                       unresize: "true",
                       align: "center"
                   }, {
                        title: '操作',
                        toolbar: '#options',
                        unresize: true,
                        align: 'center',
                        width:180,
                    }
                ]
            ]
			
			mycomm.tableInit('{$controller_title}',MODULE_PATH,cols);

        })
    </script>
	{$LOAD_STYLE.bottom|raw}
	</body>
</html>
